projects
/
project
/
uci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2fe8dbd
)
blob: use BLOBMSG_TYPE_STRING as a fallback type for arrays if no type was specified
author
Felix Fietkau
<
[email protected]
>
Mon, 2 Dec 2013 10:11:21 +0000
(11:11 +0100)
committer
Felix Fietkau
<
[email protected]
>
Mon, 2 Dec 2013 10:11:21 +0000
(11:11 +0100)
Signed-off-by: Felix Fietkau <
[email protected]
>
blob.c
patch
|
blob
|
history
diff --git
a/blob.c
b/blob.c
index 98c8d8a13a1ec627fe55c2510163d49c56088aed..ad72652cfc44092dc31571af71e30618263b10c4 100644
(file)
--- a/
blob.c
+++ b/
blob.c
@@
-105,11
+105,16
@@
__uci_element_to_blob(struct blob_buf *b, struct uci_element *e,
types |= 1 << attr->type;
if (attr->type == BLOBMSG_TYPE_ARRAY) {
- if (!p->info)
- continue;
+ int element_type = 0;
+
+ if (p->info)
+ element_type = p->info[i].type;
+
+ if (!element_type)
+ element_type = BLOBMSG_TYPE_STRING;
array = blobmsg_open_array(b, attr->name);
- uci_array_to_blob(b, o,
p->info[i].
type);
+ uci_array_to_blob(b, o,
element_
type);
blobmsg_close_array(b, array);
ret++;
continue;